

KERN_VER = $(shell uname -r)
KERN_DIR = /lib/modules/$(KERN_VER)/build	

obj-m := semaphore.o                                                                                                                         
PWD ?= $(shell pwd)
all:
	make -C $(KERN_DIR) M=$(PWD) modules    #make操作
	gcc app.c -o app.out
clean:
	make -C $(KERN_DIR) M=$(PWD) clean    #make clean操作
